<template>
<div>
  <van-nav-bar
  title="志愿者报名"
  left-text="返回"
  left-arrow
  @click-left="onClickLeft"
/>
<div><h1 class="message">请输入身份信息</h1></div>
<van-form @submit="onSubmit">
  <van-field
    v-model="name"
    name="姓名"
    label="姓名"
    placeholder="姓名"
    :rules="[{ required: true, message: '请填入本人姓名' }]"
  />
  <van-field
    v-model="idcard"
   
    name="身份证号"
    label="身份证号"
    placeholder="身份证号"
    :rules="[{ required: true, message: '请输入身份证号码' }]"
  />
  <div style="margin: 16px;">
    <van-button round block type="info" native-type="submit">立即报名</van-button>
  </div>
</van-form>
</div>

</template>

<script>
export default {
  data() {
    return {
      name: '',
      idcard: '',
    };
  },
  methods: {
    onSubmit(values) {
      console.log('submit', values);
    },
    onClickLeft(){
      this.$router.go(-1);
    }
  },
};
</script>

<style>
.message{
  text-align: center;
}
</style>